<<<<<<< HEAD
library(ggplot2)
library(gridExtra)
data<-read.csv("D:\\rwork\\SMUwork\\tipsvenuegroupbyuser.csv",header = T)
head(data)
totalData<-data
#Venue_tips by group user
#数据描述
describe<-summary(totalData$count)
describe

ppi<-300
png('Venue_tips by group user.jpg',width=14*ppi,height=9.5*ppi,res=ppi)
p1<-ggplot(data=totalData,aes(x=totalData$id,y=totalData$count))+
  geom_point()+
  xlab("User Id")+ylab("Tips Count")+
  #scale_y_continuous(breaks=seq(0,500,1),limits=c(0, 10))+
  scale_x_continuous(breaks=seq(0,9000,1000), labels=seq(0,9000,1000),limits=c(0,9000))+
  ggtitle("Venue_tips by group user")+
  geom_hline(yintercept=220,colour="red")+geom_vline(xintercept=800,colour="red")+
  theme(
    axis.text.x=element_text(colour="black",size=15),
    axis.text.y=element_text(colour="black",size=15)
  )
p1

data<-read.csv("D:\\rwork\\SMUwork\\tipsvenuegroupbyvenueid.csv",header = T)
head(data)
totalData<-data

p2<-ggplot(data=totalData,aes(x=totalData$id,y=totalData$count))+
  geom_point()+
  xlab("Venue Id")+ylab("Tips Count")+
  #scale_y_continuous(breaks=seq(0,500,1),limits=c(0, 10))+
  scale_x_continuous(breaks=seq(0,500,100), labels=seq(0,500,100),limits=c(0,500))+
  ggtitle("Venue_tips by group venueid")+
  geom_hline(yintercept=1500,colour="red")+geom_vline(xintercept=45,colour="red")+
  theme(
    axis.text.x=element_text(colour="black",size=15),
    axis.text.y=element_text(colour="black",size=15)
  )
p2



grid.arrange(p1,p2,heights=c(5,5))#as.table = TRUE, clip =TRUE ,
=======
library(ggplot2)
library(gridExtra)
data<-read.csv("D:\\rwork\\SMUwork\\tipsvenuegroupbyuser.csv",header = T)
head(data)
totalData<-data
#Venue_tips by group user
#数据描述
describe<-summary(totalData$count)
describe

ppi<-300
png('Venue_tips by group user.jpg',width=14*ppi,height=9.5*ppi,res=ppi)
p1<-ggplot(data=totalData,aes(x=totalData$id,y=totalData$count))+
  geom_point()+
  xlab("User Id")+ylab("Tips Count")+
  #scale_y_continuous(breaks=seq(0,500,1),limits=c(0, 10))+
  scale_x_continuous(breaks=seq(0,9000,1000), labels=seq(0,9000,1000),limits=c(0,9000))+
  ggtitle("Venue_tips by group user")+
  geom_hline(yintercept=220,colour="red")+geom_vline(xintercept=800,colour="red")+
  theme(
    axis.text.x=element_text(colour="black",size=15),
    axis.text.y=element_text(colour="black",size=15)
  )
p1

data<-read.csv("D:\\rwork\\SMUwork\\tipsvenuegroupbyvenueid.csv",header = T)
head(data)
totalData<-data

p2<-ggplot(data=totalData,aes(x=totalData$id,y=totalData$count))+
  geom_point()+
  xlab("Venue Id")+ylab("Tips Count")+
  #scale_y_continuous(breaks=seq(0,500,1),limits=c(0, 10))+
  scale_x_continuous(breaks=seq(0,500,100), labels=seq(0,500,100),limits=c(0,500))+
  ggtitle("Venue_tips by group venueid")+
  geom_hline(yintercept=1500,colour="red")+geom_vline(xintercept=45,colour="red")+
  theme(
    axis.text.x=element_text(colour="black",size=15),
    axis.text.y=element_text(colour="black",size=15)
  )
p2



grid.arrange(p1,p2,heights=c(5,5))#as.table = TRUE, clip =TRUE ,
>>>>>>> 41252ca3fffdbe0c113cf1c8cd7b04f21ba3a88d
dev.off()